import { createWebHashHistory, createRouter } from 'vue-router'

const routes = [
  {
    name: 'home',
    path: '',
    meta: {
      title: '首页',
    },
    component: () => import('@/layout/Layout.vue'),
    redirect: '/',
    children: [
      {
        name: 'home',
        path: '/',
        meta: {
          title: '首页'
        },
        component: () => import('@/views/home/index.vue'),
      }
    ]
  },
  {
    name: 'demo1',
    children: [
      {
        name: 'demo1',
        path: '/demo1'
      }
    ]
  }
]

export default createRouter({
  history: createWebHashHistory(),
  routes,
})
